import { post } from '../../../../utils/request.js'
import global from '../../../../utils/global.js'
var WxParse = require('../../../../wxParse/wxParse.js');
let that
Page({

  /**
   * 页面的初始数据
   */
  data: {
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    that = this;
    console.log(options)
    that.setData({
      summarizeId: options.summarizeId
    })
    that.getCheckDataDetailResultList(that.data.page)
  },
// 获取体检报告详情checkDataCategorySummarize
  getCheckDataDetailResultList(page) {
    let param = {
      // userId:that.data.userId,
      // userId: "1738",
      id: that.data.summarizeId,
      // show_type:1
    }
    post(global.apiUrl.reportDetailNew, param, function (res) {
      console.log(res.obj)
      WxParse.wxParse('article', 'html', res.obj.detail, that, 5)
      that.setData({
        url: res.obj.pdf_url,
        show_type: res.obj.show_type
      })

    })
  },
})